/**
 * Written by Timbot
 * V1.0, June 2007
 */
package com.as3.timbot.data.iterators
{
	import com.as3.timbot.data.iterators.IIterator;
	/**
	* Iterates through Arrays to retrieve data
	*/
	public class ArrayIterator implements IIterator
	{
		private var _index:uint = 0;
		private var _collection:Array;
		
		public function ArrayIterator(collection:Array)
		{
			_collection = collection;
			_index = 0;
		}
		public function reset():void
		{
			_index = 0;
		};
		public function next():Object
		{
			return _collection[_index++];
		};
		public function hasNext():Boolean
		{
			return _index < _collection.length;
		};
	}
}